An image forming apparatus such as a copying machine, a printer, or a multifunction printer includes a photoreceptor drum, a charging device, an exposure unit, a developing device, and a fixing device. In the image forming apparatus, the charging device uniformly charges a surface of the photoreceptor drum, and the exposure unit exposes the uniformly charged surface of the photoreceptor drum in accordance with image data, thereby forming an electrostatic latent image. Then, the developing device develops the electrostatic latent image with toner. A toner image thus developed is transferred onto a sheet of recording paper carried to an area for the transfer (such an area being hereinafter referred to as “transfer area”), and is fixed onto the sheet of recording paper by the fixing device. In the image forming apparatus, a sheet of recording paper is carried from a paper feeding tray to the transfer area. When the sheet of recording paper is carried, the sheet of recording paper may be misaligned in a direction perpendicular to a carrying direction. This causes variations in the position of images that are formed on sheets of recording paper.
In view of this, Patent Literature 1 describes a technique for detecting that edge of a sheet of recording paper which is oriented in a carrying direction and correcting, in accordance with a result of the detection, a timing at which an electrostatic latent image is written onto a photoreceptor drum.